<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Person(name,age){
            this.name = name;
            this.age = age;
        }
        /* 在原型对象当中创建一个吃的方法 */
        Person.prototype.eat = function(){
            console.log("吃");
        }

        let p1 = new Person("郑香",18);
        let p2 = new Person("文渊",19);

        // p1.eat()
        // console.log(p1);
        console.log(p1.eat === p2.eat);
    </script>
</body>
</html>